Merge the last set of changes from the gh-pages branch

This commit is contained in:
Jeff Parsons 2016-12-04 11:31:03 -08:00 • committed by Jeff Parsons
commit d8f0e64329
30 changed files with 338 additions and 315 deletions

View file

@ -50,8 +50,8 @@ p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];
function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function fa(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}
function ha(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ia(a,b){return-1!==a.indexOf(b,a.length-b.length)}var ja={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
var ma={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},na=Date.now||function(){return+new Date};function oa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
var pa=[31,28,31,30,31,30,31,31,30,31,30,31];function qa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.sg|g<<f.shift&f.sg}return c}function ra(a,b){return(b&a.sg)>>a.shift}
var ma={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},na=Date.now||function(){return+new Date};
function oa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var pa=[31,28,31,30,31,30,31,31,30,31,30,31];function qa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.sg|g<<f.shift&f.sg}return c}function ra(a,b){return(b&a.sg)>>a.shift}
function sa(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"==
typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ta(){return"http://"+(window?window.location.host:"www.pcjs.org")}
function r(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va}function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
@ -565,8 +565,8 @@ l.wi=function(a){if(!this.D){var b=nc(this.ba,"connection");if(b){var c=b.split(
l.Ub=function(a,b){if(!b)if(this.wi(this.Z),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){Wl(this)};l.save=function(){var a=new de(this),b=0,c=[];c[b++]=this.ma;c[b++]=this.pa;c[b++]=this.P;c[b++]=this.Y;c[b++]=this.H;c[b++]=this.L;c[b++]=this.da;c[b++]=this.C;c[b++]=this.B;c[b]=this.K;a.set(0,c);return a.data()};l.restore=function(a){return Wl(this,a[0])};
function Wl(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,a.sa,[]]);a.ma=b[c++];a.pa=b[c++];a.P=b[c++];a.Y=b[c++];a.H=b[c++];a.L=b[c++];a.da=b[c++];a.C=b[c++];a.B=b[c++];a.K=b[c];return!0}l.jf=function(a){if("number"==typeof a)this.K.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.K.push(a.charCodeAt(b));else this.K=this.K.concat(a);Xl(this);return!0};l.$j=function(a){var b=this.B;this.B&=~(Rl|Sl);a&32&&(this.B=this.B|Rl|1);a&64&&(this.B=this.B|Sl|2);b!=this.B&&Yl(this)};
function Xl(a){0<a.K.length&&!(a.C&1)&&(a.ma=a.K.shift(),a.C|=1);Yl(a)}l.pl=function(){var a=this.L&128?this.P&255:this.ma;this.C&=-2;Xl(this);return a};l.bl=function(){return this.L&128?this.P>>8:this.Y};l.cl=function(){return this.H};l.dl=function(){return this.L};l.fl=function(){return this.da};l.el=function(){return this.C};l.kl=function(){var a=this.B;this.B&=-4;return a};
l.Im=function(a,b){if(this.L&128)this.P=this.P&-256|b;else{this.pa=b;this.C&=-97;a=!1;this.ga&&this.ga.call(this.D,b)&&(a=!0);if(this.G){if(13==b)this.R=0;else if(8==b)this.G.value=this.G.value.slice(0,-1),0<this.R&&this.R--;else{a=(a=ma[b])?"<"+a+">":String.fromCharCode(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(b=this.ra||8,c=b-this.R%b,this.ra&&(a=" ".slice(0,c)));this.qa&&!this.R&&c&&(a=String.fromCharCode(this.qa)+a);this.G.value+=a;this.G.scrollTop=this.G.scrollHeight;
this.R+=c}a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.rc(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.C|=96)}};l.vm=function(a,b){this.L&128?this.P=this.P&255|b<<8:this.Y=b};l.wm=function(a,b){this.L=b};l.xm=function(a,b){a=b^this.da;this.da=b;a&3&&this.Rc&&(a=0,a=this.Z?a|(b&2?32:0)|(b&1?320:0):a|(b&2?16:0)|(b&1?1048576:0),this.Rc.call(this.D,a))};
l.Im=function(a,b){if(this.L&128)this.P=this.P&-256|b;else{this.pa=b;this.C&=-97;a=!1;this.ga&&this.ga.call(this.D,b)&&(a=!0);if(this.G){if(13==b)this.R=0;else if(8==b)this.G.value=this.G.value.slice(0,-1),0<this.R&&this.R--;else{a=(a=13!=b&&10!=b?ma[b]:null)?"<"+a+">":String.fromCharCode(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(b=this.ra||8,c=b-this.R%b,this.ra&&(a=" ".slice(0,c)));this.qa&&!this.R&&c&&(a=String.fromCharCode(this.qa)+a);this.G.value+=a;this.G.scrollTop=
this.G.scrollHeight;this.R+=c}a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.rc(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.C|=96)}};l.vm=function(a,b){this.L&128?this.P=this.P&255|b<<8:this.Y=b};l.wm=function(a,b){this.L=b};l.xm=function(a,b){a=b^this.da;this.da=b;a&3&&this.Rc&&(a=0,a=this.Z?a|(b&2?32:0)|(b&1?320:0):a|(b&2?16:0)|(b&1?1048576:0),this.Rc.call(this.D,a))};
function Yl(a){var b=-1;a.C&1&&a.Y&1?b=4:a.B&3&&a.Y&8&&(b=0);0<=b?(a.H&=-8,a.H|=b,a.S&&a.W&&Ue(a.S,a.W,100)):(a.H|=1,a.S&&a.W&&Te(a.S,a.W))}var Ul={0:Ql.prototype.pl,1:Ql.prototype.bl,2:Ql.prototype.cl,3:Ql.prototype.dl,4:Ql.prototype.fl,5:Ql.prototype.el,6:Ql.prototype.kl},Vl={0:Ql.prototype.Im,1:Ql.prototype.vm,3:Ql.prototype.wm,4:Ql.prototype.xm};Ga(function(){for(var a=bb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Ql(d);ab(d,c)}});
function Zl(a){Ka.call(this,"Mouse",a,Zl);if(this.Y=a.serial)this.Z="SerialPort";this.W=this.P=this.cc=!1;this.D=[];this.C=[];t(this)}Ta(Zl);var pl=0;l=Zl.prototype;l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;for(b=null;b=mb(a,"Video",b);)this.D.push(b)};
l.Ub=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.Z&&!this.G){for(a=null;(a=mb(this.ba,this.Z,a))&&(!a.fi||!(this.G=a.fi(this.Y,this,this.Zj))););if(this.G)for(this.C=[],a=0;a<this.D.length;a++)b=this.D[a],b.P=this,(b=b.G)&&this.C.push(b);else r(this.id+": "+this.Z+" "+this.Y+" unavailable")}this.cc?$l(this):am(this)}return!0};l.Tb=function(a){return a?this.save():!0};l.reset=function(){bm(this)};