From 0daf7520b15efa79dfdd0db834ef43bb2fb302e0 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 24 Mar 2016 11:38:05 -0700 Subject: [PATCH] Fixed issue with SeaMonkey (one of the few browsers that didn't support innerText on DOM elements) --- docs/pcjs/examples/pc-dbg.js | 2 +- docs/pcjs/examples/pc.js | 2 +- modules/pcjs/lib/fdc.js | 5 +-- versions/c1pjs/1.21.3/c1p-dbg.js | 4 +-- versions/c1pjs/1.21.3/c1p.js | 4 +-- versions/pcjs/1.21.3/pc-dbg.js | 62 ++++++++++++++++---------------- versions/pcjs/1.21.3/pc.js | 60 +++++++++++++++---------------- 7 files changed, 70 insertions(+), 69 deletions(-) diff --git a/docs/pcjs/examples/pc-dbg.js b/docs/pcjs/examples/pc-dbg.js index 2fb542fc8b..a0e9c58c06 100644 --- a/docs/pcjs/examples/pc-dbg.js +++ b/docs/pcjs/examples/pc-dbg.js @@ -606,7 +606,7 @@ function tp(a,b){var c=0,d,e=!0;void 0===b&&(b=[0,0,128,Array(9),0,0,0,[]]);a.gb 9;break;case 1200:g.Cb=80;g.lb=15;break;case 1440:g.Cb=80,g.lb=18}}var k=a,l=d,n=f[d],q=0;h=!0;g.gb=l;g.bd=g.Ye=!1;void 0===n&&(n=[192,!0,0,2,0]);"boolean"==typeof n[1]&&(n[1]=["Floppy Drive",g.Cb||40,g.vb||n[3],g.lb||9,g.Ua||512,n[1],g.yg,g.Nf,g.Of]);g.Db=n[q++];var p=n[q++];g.name=p[0];g.Cb=p[1];g.vb=p[2];g.lb=p[3];g.Ua=p[4];g.$e=p[5];(g.yg=p[6])?(g.Nf=p[7],g.Of=p[8]):(g.yg=g.Cb,g.Nf=g.vb,g.Of=g.lb);g.jb=n[q++];g.de=n[q++];g.Tb=n[q++];g.de=100<=g.de?g.de-100:g.de-g.Tb;g.yb=n[q++];g.ee=n[q++];g.Hb= n[q++];g.cb=n[q++];g.ob=null;g.ya||(g.Je="");p=n[q++];102==p&&(p=!1);if("boolean"==typeof p){var A=p,p=n[q++],n=n[q];A?(q=p,p=k.A[l],yp(k,l,!0,!0),p.Ye=!0,l=new Go(k,p,"preload"),k.Ii(p,l,q,n,!0)):Ap(k,l,p,n,!0)?g.ya&&n&&Bp(k,p,n,g.ya):sb(k,!1)}else void 0!==p&&g.ya&&0>g.ya.restore(p)&&(h=!1);h&&g.ya&&void 0!==g.cb&&(g.ob=g.ya.seek(g.Tb,g.jb,g.yb));h||(e=!1)}a.W=b[c++]||0;a.mc=b[c]||0;return e}m.Hi=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b}; m.mk=function(a,b,c){if(a.ya){var d=a.ya.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Tb=Math.floor(b/f),b%=f,a.jb=Math.floor(b/e),a.yb=b%e+1,a.Hb=c*d[3],a.Db=0,!0}return!1}; -function xp(a,b){b||(a.fa=0);if(a.U)for(var c in a.U){var d=a.U[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.qa.listDisks)&&f.options)for(var g=0;ga.Cb||f[1]>a.vb)&&(this.Oa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.gb)),b=null);b?(a.ya=b,a.lk=c,a.Je=d,Bp(this,c,d,b),f=b.info(),this.W|=128,this.Oa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.gb),a.xe||e),a.yg=f[0],a.Nf=f[1],a.Of=f[2]):a.Ye=!1;a.xe&&(a.xe=!1,--this.fa||sb(this));rp(this,a.gb)}; diff --git a/docs/pcjs/examples/pc.js b/docs/pcjs/examples/pc.js index dbb657f345..244e84de3f 100644 --- a/docs/pcjs/examples/pc.js +++ b/docs/pcjs/examples/pc.js @@ -552,7 +552,7 @@ c[b++]=this.L;c[b]=this.H;D(a,0,c);return a.data()};l.restore=function(a){return function sm(a,b){var c=0,d,e=!0;void 0===b&&(b=[0,0,128,Array(9),0,0,0,[]]);a.Ra=b[c++];c++;a.Z=b[c++];a.I=b[c++];a.G=b[c++];a.D=b[c++];a.S=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.C=d);void 0===a.B&&(a.Y=4,a.R&&(a.Y=lj(a.R)),a.B=Array(4));for(d=0;dg.ua.restore(r)&&(h=!1);h&&g.ua&&void 0!==g.Ua&&(g.Wa=g.ua.seek(g.xb,g.Ya,g.pb));h||(e=!1)}a.L=b[c++]||0;a.H=b[c]||0;return e} -function wm(a,b){b||(a.P=0);if(a.K)for(var c in a.K){var d=a.K[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.ka.listDisks)&&f.options)for(var g=0;ga.lb||f[1]>a.mb)&&(this.Ca('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Ra)),b=null);b?(a.ua=b,a.kj=c,a.Ud=d,Am(this,c,d,b),f=b.info(),this.L|=128,this.Ca('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Ra),a.Md||e),a.Jf=f[0],a.Ue=f[1],a.Ve=f[2]):a.ke=!1;a.Md&&(a.Md=!1,--this.P||p(this));qm(this,a.Ra)}; diff --git a/modules/pcjs/lib/fdc.js b/modules/pcjs/lib/fdc.js index 8c36917ff9..7aec141a55 100644 --- a/modules/pcjs/lib/fdc.js +++ b/modules/pcjs/lib/fdc.js @@ -1483,8 +1483,9 @@ FDC.prototype.findDiskette = function(sPath) var controlDisks = this.bindings["listDisks"]; if (controlDisks && controlDisks.options) { for (var i = 0; i < controlDisks.options.length; i++) { - if (controlDisks.options[i].value == sPath) { - return controlDisks.options[i].innerText; + var control = controlDisks.options[i]; + if (control.value == sPath) { + return control.textContent; } } } diff --git a/versions/c1pjs/1.21.3/c1p-dbg.js b/versions/c1pjs/1.21.3/c1p-dbg.js index 766ccb84f4..f57591386b 100644 --- a/versions/c1pjs/1.21.3/c1p-dbg.js +++ b/versions/c1pjs/1.21.3/c1p-dbg.js @@ -1,7 +1,7 @@ (function(){var f;function p(a,b){var c="";void 0===b?b=8:8=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function q(a){return"0x"+p(a,2)}function r(a){return"0x"+p(a,4)}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var ea=Date.now||function(){return+new Date}; -function t(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var e=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");e.onreadystatechange=function(){4===e.readyState&&(d=e.responseText,200==e.status||!e.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=e.status||-1),b&&b(a,d,c))};e.open("GET",a,!0);e.send()}}function u(a){window&&window.alert(a)} -function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"}; function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var q=Date.now||function(){return+new Date}; -function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};f.open("GET",a,!0);f.send()}}function t(a){window&&window.alert(a)} -function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var w={init:[],show:[],exit:[]},ea=!1,x=!0;function fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function y(a){w.init.push(a)} +function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else if("function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};f.open("GET",a,!0);f.send()}} +function t(a){window&&window.alert(a)}function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var w={init:[],show:[],exit:[]},ea=!1,x=!0;function fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function y(a){w.init.push(a)} function z(a){if(x)try{for(var b=0;bb?1:a>1,h;h=c(b,a[g]);0a?"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 ra=[31,28,31,30,31,30,31,31,30,31,30,31];function sa(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.mh|g<>a.shift} function ua(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb?d=256:0===b&&(d=16384));a.ma=a.ma&-18177|d;return!0}return!1}function ng(a,b,c){if(null==b)return null;var d=a.mc&3072;0==d?(d=Math.round(b),.5===d-b&&d%2&&d--):d=1024==d||3072==d&&0=c){if(gg(a,1))return null;d=-c}else if(d<-c){if(gg(a,1))return null;d=-c}a.da[0]=d|0;2147483648d&&(a.da[1]=-1))}return d} function og(a,b){var c=3;if(a.C&1<=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function zg(a){var b=a.B+0&7;return a.C&1<>16}function Eg(a){return a.F.oa(a.F.D)}function Fg(a){a.ua[0]=a.F.oa(a.F.D);return a.pa[0]}function Gg(a){a.da[0]=a.F.oa(a.F.D);a.da[1]=a.F.oa(a.F.D+4);return a.W[0]} -function Hg(a){a.ea[0]=a.F.oa(a.F.D);a.ea[1]=a.F.oa(a.F.D+4);a.ea[2]=a.F.na(a.F.D+8);return a.ea}m.oi=function(){this.F.mb(this.F.D,this.da[0])};m.nk=function(){this.F.mb(this.F.D,this.da[0]);this.F.mb(this.F.D+4,this.da[1])};m.qk=Yf.prototype.oi;m.pk=Yf.prototype.nk;function Ig(a){a.F.mb(a.F.D,a.ea[0]);a.F.mb(a.F.D+4,a.ea[1]);a.F.ib(a.F.D+8,a.ea[2])} +function Hg(a){a.ea[0]=a.F.oa(a.F.D);a.ea[1]=a.F.oa(a.F.D+4);a.ea[2]=a.F.na(a.F.D+8);return a.ea}m.oi=function(){this.F.mb(this.F.D,this.da[0])};m.pk=function(){this.F.mb(this.F.D,this.da[0]);this.F.mb(this.F.D+4,this.da[1])};m.rk=Yf.prototype.oi;m.qk=Yf.prototype.pk;function Ig(a){a.F.mb(a.F.D,a.ea[0]);a.F.mb(a.F.D+4,a.ea[1]);a.F.ib(a.F.D+8,a.ea[2])} function Jg(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767,f=b[0]>>>11|c<<21,c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,f=c=0));a.da[0]=f;a.da[1]=c|(d|e)<<20;return a.W[0]}function Cg(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?d=32767:d?d+=15360:e&=2147483647;a.ea[0]=b<<11;a.ea[1]=e;a.ea[2]=c>>16&32768|d;return a.ea}function Kg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function Lg(a,b){for(var c=0,d=0;b--;)c|=a%10<>11;bg(a);cg(a,d.ub(b+=d.aa));!(d.Ya&1)||d.ba&131072?(a.V=d.ub(b+=d.aa),c=d.ub(b+=d.aa),a.ia=c&2047,a.V|=(c&-4096)<<4,a.fa=-1,a.U=d.ub(b+=d.aa),a.U|=(d.ub(b+=d.aa)&-4096)<<4,a.ga=-1):(a.V=d.ub(b+=d.aa),c=d.ub(b+=d.aa),a.fa=c&65535,a.ia=c>>16&2047,a.U=d.ub(b+=d.aa),a.ga=d.ub(b+=d.aa)&65535);return b+d.aa} @@ -152,17 +152,17 @@ function Xg(){mg(this,U(this,0),U(this,this.A))}function Yg(){mg(this,U(this,0), function fh(){for(var a=this.F,b=Pg(this,a.D),c=0;c>20&2047)-1023),this.da[1]=(this.da[1]|1072693248)&-1073741825,Ng(this,this.W[0]))},102:function(){this.B=this.B-1&7;this.ma&=-513},103:function(){this.B=this.B+1&7;this.ma&=-513},112:function(){V(this,0,U(this,0)%U(this,1))},113:function(){V(this,1, U(this,1)*Math.log(U(this,0)+1)/Math.LN2)&&Mg(this)},114:function(){var a=U(this,0),b=null;if(0<=a||!gg(this,1))b=Math.sqrt(a),hg(this,b)||(b=null);V(this,0,b)},116:function(){V(this,0,ng(this,U(this,0),Vg))},117:function(){var a=U(this,0),b=U(this,1);null!=a&&null!=b&&V(this,0,a*Math.pow(2,0>>0);Ng(this,a)},6:function(){var a=ng(this,Mg(this));null!=a&&(this.ea[0]= -Lg(a,8),this.ea[1]=Lg(a/1E8,8),this.ea[2]=Lg(a/1E16,2),0>a&&(this.ea[2]|=32768),Ig(this))},7:function(){null!=ng(this,U(this,0),Vg)&&(this.nk(),Mg(this))},48:function(){ah.call(this);Mg(this)},49:nh,50:ih,51:ih,52:lh}},ph=[Wg,bh,ch,dh,eh,fh,jh,gh,kh,lh];Qa(function(){for(var a=nb(document,"pcjs","fpu"),b=0;ba&&(this.ea[2]|=32768),Ig(this))},7:function(){null!=ng(this,U(this,0),Vg)&&(this.pk(),Mg(this))},48:function(){ah.call(this);Mg(this)},49:nh,50:ih,51:ih,52:lh}},ph=[Wg,bh,ch,dh,eh,fh,jh,gh,kh,lh];Qa(function(){for(var a=nb(document,"pcjs","fpu"),b=0;b>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.cj;(bd)&&C.call(this,5);this.S|=2;return a}function yh(a,b){var c=0;if(b){Ef(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Gf(this);this.A-=11+3*c;return a}function zh(a,b){var c=0;if(b){Ef(this);for(var d=2==this.aa?15:31,e=1<>>=1;c++;d--}}else Gf(this);this.A-=11+3*c;return a} @@ -458,21 +458,21 @@ m.reset=function(){if(!this.ja&&this.N)switch(this.N.ja){case Ak:case 5160:nm(th function zm(a,b){if(0>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.yc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in um)d="led-"+g,e=um[g],c&&c!=e||!(f=a.qa[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.yc&=~b,d&&(a.yc|=b);return!0}}return!1} function wm(a,b,c){if(Y[b]&&a.F&&a.F.la.Jb){rm[b]&&a.B.length&&0e||(e==a.B.length&&(d={},d.Ke=b,d.yc=a.yc,Am(a,b,!0),e++),0b.Jd){if(!b.Ef){ym(a,b.Ke);return}b.Ef=!1;c=a.ra}else c=1==b.Jd++?500:100;b.rk=setTimeout(function(a){return function(){Cm(a,b)}}(a),c)}} +function ym(a,b,c){if(!Y[b]||!(c||a.F&&a.F.la.Jb))return!1;for(var d=!1,e=0;eb.Jd){if(!b.Ef){ym(a,b.Ke);return}b.Ef=!1;c=a.ra}else c=1==b.Jd++?500:100;b.sk=setTimeout(function(a){return function(){Cm(a,b)}}(a),c)}} function Em(a,b,c){var d=b;if(65<=b&&90>=b)!(a.yc&515)==c&&(d=b+32);else if(97<=b&&122>=b)!!(a.yc&515)==c&&(d=b-32);else if(!!(a.yc&3)==c){if(a=qm[b])d=a}else if(a=pm[b])d=a;return d}m.Fg=function(a){a||(this.yc&=-256)}; function vm(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Em(a,g,!0);a.bh&&h==X["`"]&&(g=h=27);if(Y[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),xm(a,h,!1,c)){if(20==g||144==g||145==g)a.ka||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k=b||97<=b&&122>=b;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+t(f)+" buffered"),e.A.push(f),1== e.A.length&&e.N&&Wl(e.N,f)):(20==e.A.length&&e.A.push(255),y(e,"scan code buffer overflow")));d=!0}return d}Qa(function(){for(var a=nb(document,"pcjs","keyboard"),b=0;bc.length)c=[!1,0,null,null,0,Array(5>b?Wm:Xm)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.kb=b;this.nb=e[2];this.cc=e[3];this.Cd=d||e[4];65536<=this.Cd&&720896<=this.nb&&(this.cc=Math.min(this.Cd>>2,32768));this.Hc=c[0];this.gd=c[1];this.qf=c[2];this.ma=c[3];this.Bc=c[4]&255;this.Ig=c[4]>>8&255;this.sb=c[5];this.nh=Wm;this.jg=Ym;if(5<=b){this.nh=Xm;this.jg=Zm;b=c[6];void 0===b&&(b=[!1,0,Array(20), -0,3==f?0:1,0,0,Array(5),0,0,0,Array(9),0,[this.nb,this.cc,this.Cd],Array(this.Cd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ve=b[0];this.Ld=b[1];this.Sc=b[2];this.Tg=$m;this.Lg=b[3];this.sf=b[4];this.dg=b[5];this.$d=b[6];this.He=b[7];this.Vg=an;this.hk=b[8];this.ik=b[9];this.Zd=b[10];this.Yd=b[11];this.Ug=bn;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.nb,this.cc,d]);this.nb=d[0];this.cc=d[1];d=this.Cd>>2;if((this.rd=b[14])&&this.rd.length>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ve=b[0];this.Ld=b[1];this.Sc=b[2];this.Tg=$m;this.Lg=b[3];this.sf=b[4];this.dg=b[5];this.$d=b[6];this.He=b[7];this.Vg=an;this.ik=b[8];this.jk=b[9];this.Zd=b[10];this.Yd=b[11];this.Ug=bn;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.nb,this.cc,d]);this.nb=d[0];this.cc=d[1];d=this.Cd>>2;if((this.rd=b[14])&&this.rd.length>this.controller.dd|b<<8-this.controller.dd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.controller.Nb;d=this.controller.Uf&d|this.controller.Fb&~d;d=d&this.controller.rb|this.ca[c]&~this.controller.rb;this.ca[c]!=d&&(this.ca[c]=d,this.Va=!0)}; -function en(a){var b=[];if(void 0!==a.kb){b[0]=a.Hc;b[1]=a.gd;b[2]=a.qf;b[3]=a.ma;b[4]=a.Bc|a.Ig<<8;b[5]=a.sb;if(5<=a.kb){var c=[];c[0]=a.Ve;c[1]=a.Ld;c[2]=a.Sc;c[3]=a.Lg;c[4]=a.sf;c[5]=a.dg;c[6]=a.$d;c[7]=a.He;c[8]=a.hk;c[9]=a.ik;c[10]=a.Zd;c[11]=a.Yd;c[12]=a.Fb;c[13]=[a.nb,a.cc,a.Cd];var d;a:if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=l}if(f.lengthg;g++)for(var h=g;h>1;f[e++]=k;h=l}if(f.length>3;for(c=0;c=d&&(A=d,q=!0);break;case "p":0<= @@ -496,7 +496,7 @@ b.Ld),b.ha.O(" ATCDATA: "+b.Ve),fn(b," FEAT",b.dg),fn(b," MISC",b.sf "textarea":"canvas","kbd",this.da)}this.Vc=9;(this.N=Eb(a,"ChipSet"))&&this.ag&&5==this.kb&&(this.Vc=uk(this.ag,this.Vc));"mouse"==this.bg?(this.V=Eb(a,"Mouse"))&&pn(this,2):"keygrid"==this.bg&&this.B&&pn(this,1)}; m.Rb=function(a,b,c){var d=this;if(!this.qa[b])switch(this.qa[b]=c,b){case "fullScreen":return this.ga&&this.ga.Ue?c.onclick=function(){d.Ue()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.vk=c.textContent,this.da&&this.da.Ae?c.onclick=function(){d.Ae(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){Yc(d,!0)},!0}return!1};m.Tc=function(){this.da&&this.da.focus()}; m.Ue=function(){var a=!1;if(this.ga){if(this.ga.Ue){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.ua/this.Ea;b>c&&(a=Math.round(c/b*100)+"%")}this.nf?(this.pa.style.width=a,this.pa.style.width=a,this.pa.style.display="block",this.pa.style.margin="auto"):(this.ga.style.width=a,this.ga.style.height="auto");this.ga.style.backgroundColor="black";this.ga.Ue();a=!0}this.Tc()}return a}; -function Im(a,b){!b&&a.ga&&(a.nf?a.pa.style.width=a.pa.style.height="":a.ga.style.width=a.ga.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.bh=b)}m.Ae=function(a){var b=!1;this.da&&(a?this.da.Ae&&(this.da.Ae(),this.V&&this.V.Vf(!0),b=!0):this.da.sk&&(this.da.sk(),this.V&&this.V.Vf(!1),b=!0),this.Tc());return b};m.Vf=function(a){this.V&&(this.V.Vf(a),this.B&&(this.B.bh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.vk)}; +function Im(a,b){!b&&a.ga&&(a.nf?a.pa.style.width=a.pa.style.height="":a.ga.style.width=a.ga.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.bh=b)}m.Ae=function(a){var b=!1;this.da&&(a?this.da.Ae&&(this.da.Ae(),this.V&&this.V.Vf(!0),b=!0):this.da.tk&&(this.da.tk(),this.V&&this.V.Vf(!1),b=!0),this.Tc());return b};m.Vf=function(a){this.V&&(this.V.Vf(a),this.B&&(this.B.bh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.vk)}; function pn(a,b){var c=a.da;c&&!a.je&&(c.addEventListener("touchstart",function(b){qn(a,b,!0)},!1),c.addEventListener("touchmove",function(b){qn(a,b)},!0),c.addEventListener("touchend",function(b){qn(a,b,!1)},!1),a.je=b,a.dc=a.oc=a.gg=-1,a.Gd=!1,a.Xc=null,a.Fd=!1,a.tn=function(){a.Fd=!0;a.V.ge(rn,!0)})}m.Fg=function(a){this.B&&this.B.Fg(a)}; function qn(a,b,c){var d,e,f=0,g=0;e=a.pa;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.ua/a.pa.offsetWidth,k=a.Ea/a.pa.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.je)d=d/(a.ua/3)|0,e=e/(a.Ea/3)|0,1!=e?e?wm(a.B,1040,!0):wm(a.B,1038,!0):1!=d&&(d?wm(a.B,1039,!0):wm(a.B,1037,!0));else if(a.V){g=a.Gd;f=b.timeStamp-a.gg;!0===c?(a.Gd=500f){a.V.ge(rn,!0);a.V.ge(rn,!1);return}}if(c||0>a.dc||0>a.oc)a.dc=d,a.oc=e;c=Math.round(d-a.dc);b=Math.round(e-a.oc);a.dc=d;a.oc=e;a.V.Hf(c,b,a.dc,a.oc)}}m.kc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};m.jc=function(a){return a?this.save():!0}; @@ -531,8 +531,8 @@ m.ek=function(a,b,c){var d=this.A,e=d.Ld&32;if(d.Ve){d.Ve=!1;var f=d.Ld&31;if(16 m.cn=function(a,b,c){this.A.sf=b;sn(this);x(this,962,b,c,"MISC")};m.Tl=function(a,b){var c=this.A.li;x(this,963,null,b,"VGA_ENABLE",c);return c};m.mn=function(a,b,c){this.A.li=b;x(this,963,b,c,"VGA_ENABLE")};m.Ql=function(a,b){var c=this.A.$d;x(this,964,null,b,"SEQ.INDX",c);return c};m.jn=function(a,b,c){this.A.$d=b;x(this,964,b,c,"SEQ.INDX")};m.Pl=function(a,b){var c=this.A.He[this.A.$d];b&&!z(this)||x(this,965,null,b,"SEQ."+this.A.Vg[this.A.$d],c);return c}; m.hn=function(a,b,c){c&&!z(this)||x(this,965,b,c,"SEQ."+this.A.Vg[this.A.$d]);this.A.He[this.A.$d]=b;switch(this.A.$d){case 2:this.A.rb=Sm[b&15];break;case 4:co(this,bo(this))&&Yc(this,!0)}};m.sl=function(a,b){var c=this.A.ki;b&&!z(this)||x(this,966,null,b,"DAC.MASK",c);return c};m.Km=function(a,b,c){c&&!z(this)||x(this,966,b,c,"DAC.MASK");this.A.ki=b};m.tl=function(a,b){var c=this.A.Jg;b&&!z(this)||x(this,967,null,b,"DAC.STATE",c);return c}; m.Lm=function(a,b,c){c&&!z(this)||x(this,967,b,c,"DAC.READ");this.A.od=b;this.A.Jg=3;this.A.Kc=0};m.Mm=function(a,b,c){c&&!z(this)||x(this,968,b,c,"DAC.WRITE");this.A.od=b;this.A.Jg=0;this.A.Kc=0};m.rl=function(a,b){var c=this.A.rf[this.A.od]>>this.A.Kc&63;b&&!z(this)||x(this,969,null,b,"DAC.DATA["+t(this.A.od)+"]["+t(this.A.Kc)+"]",c);this.A.Kc+=6;12g.ya.restore(p)&&(h=!1);h&&g.ya&&void 0!==g.cb&&(g.ob=g.ya.seek(g.Tb,g.jb,g.yb));h||(e=!1)}a.W=b[c++]||0;a.mc=b[c]||0;return e}m.Hi=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b}; -m.lk=function(a,b,c){if(a.ya){var d=a.ya.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Tb=Math.floor(b/f),b%=f,a.jb=Math.floor(b/e),a.yb=b%e+1,a.Hb=c*d[3],a.Db=0,!0}return!1}; -function xp(a,b){b||(a.fa=0);if(a.U)for(var c in a.U){var d=a.U[c],e=d.path,f;if(!(f=d.name))a:{if((f=a.qa.listDisks)&&f.options)for(var g=0;ga.Cb||f[1]>a.vb)&&(this.Oa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.gb)),b=null);b?(a.ya=b,a.kk=c,a.Je=d,Bp(this,c,d,b),f=b.info(),this.W|=128,this.Oa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.gb),a.xe||e),a.yg=f[0],a.Nf=f[1],a.Of=f[2]):a.Ye=!1;a.xe&&(a.xe=!1,--this.fa||sb(this));rp(this,a.gb)}; +m.Ii=function(a,b,c,d,e){var f;a.bd=!1;b&&(f=b.info(),b&&f[0]>a.Cb||f[1]>a.vb)&&(this.Oa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.gb)),b=null);b?(a.ya=b,a.lk=c,a.Je=d,Bp(this,c,d,b),f=b.info(),this.W|=128,this.Oa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.gb),a.xe||e),a.yg=f[0],a.Nf=f[1],a.Of=f[2]):a.Ye=!1;a.xe&&(a.xe=!1,--this.fa||sb(this));rp(this,a.gb)}; function wp(a,b,c){if((a=a.qa.listDisks)&&a.options){for(var d=0;d=this.C&&(this.ma&=-81,this.L=this.C=0);return c}; m.Pm=function(a,b,c){z(this)&&x(this,a,b,c,"DATA["+this.C+"]");this.C=qp[a].Rd){b=!1;this.L=0;a=Cp(this);var d,e,f,g,h=a&31;switch(h){case 3:Cp(this);Cp(this);Dp(this);break;case 4:c=Cp(this);this.gb=c&3;d=this.A[this.gb];Dp(this);Ep(this,(d.Db&-16777216)>>>24);break;case 5:case 6:c=Cp(this);b=c>>2&1;this.gb=c&3;d=this.A[this.gb];d.jb=b;c=d.Tb=Cp(this);e=Cp(this);f=d.yb=Cp(this);g=Cp(this);d.Hb=128<k.ya.restore(g)&&(A=!1),A&&void 0!==k.cb&&(k.ob=k.ya.seek(k.ae,k.jb,k.yb+ k.lg)));A||(e=!1);null!=a.pa&&1>=d&&(a.pa|=(f.type&3)<<(1-d<<1))}0<=a.gb&&(a.B=a.A[a.gb]);return e}m.Hi=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b}; function Rp(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Oe[2])?e=b.Oe[0]<<8|b.Oe[1]:c=b.type);null==c||d||(d=Kp[a.U][c][1],e=Kp[a.U][c][0]);d&&((c=Kp[a.U][b.type])&&e!=c[0]&&d!=c[1]&&a.Oa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.Cb=e,b.vb=d,null==b.ya&&(b.ya=new Go(a,b,b.mode)))}} -m.lk=function(a,b,c){if(a.ya){var d=a.ya.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.ae=Math.floor(b/g),b%=g,a.jb=Math.floor(b/f),a.yb=b%f,a.Hb=c*d[3],a.errorCode=0,!0}}return!1}; +m.mk=function(a,b,c){if(a.ya){var d=a.ya.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.ae=Math.floor(b/g),b%=g,a.jb=Math.floor(b/f),a.yb=b%f,a.Hb=c*d[3],a.errorCode=0,!0}}return!1}; function Pp(a,b){b||(a.fa=0);for(var c=0;c=this.C&&(this.L=this.C=0,this.ma&=-15);return c};m.nn=function(a,b,c){x(this,a,b,c,"DATA["+this.C+"]");this.C=a&&(this.ma|=2,this.ma&=-2,Sp(this))};m.Yl=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.L>5,f=c&31,g=Zp(a),h=Zp(a),k=g<<2&768|h,l=g&63,n=Zp(a),q=Zp(a),p=a.A[e];p&&(p.ae=k,p.jb=f,p.yb=l,p.Hb=n*p.Ua);switch(b){case 3:$p(a,p?p.errorCode:4);aq(a,c);aq(a,g);aq(a,h);aq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=Zp(a));)p&&c>5,f=c&31,g=Zp(a),h=Zp(a),k=g<<2&768|h,l=g&63,n=Zp(a),q=Zp(a),p=a.A[e];p&&(p.ae=k,p.jb=f,p.yb=l,p.Hb=n*p.Ua);switch(b){case 3:$p(a,p?p.errorCode:4);aq(a,c);aq(a,g);aq(a,h);aq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=Zp(a));)p&&cb?Up(a,c):c(-1,!1)};m.Ak=function(a,b){return void 0!==b&&0<=b?Xp(a,b):-1}; m.Nk=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.cbXp(a,a.yi)){c=-1;break a}a.mg++}a.mg>=a.ee&&(c=-1)}else c=-1;return c}; function bq(a,b,c){b.errorCode=4;if(b.ya&&(b.ob=null,a.N)){b.errorCode=0;yl(a.N,3,a,"dmaRead",b);ql(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function cq(a,b,c){b.errorCode=4;if(b.ya&&(b.ob=null,a.N)){b.errorCode=0;yl(a.N,3,a,"dmaWrite",b);ql(a.N,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)} @@ -695,7 +695,7 @@ m.ub=function(a,b){return a.Ub?this.oa(a,b?4:0):this.na(a,b?2:0)};m.na=function( m.ib=function(a,b,c){var d=this.fc(a,!0,2);-1!==d&&(5!=a.type?this.F.ib(d,b):fc(this.ea,d,b),c&&Sq(this,a,c),Tc(this.F,!0))};function gq(a,b,c,d,e,f,g){return Tq(a,{},b,c,d,e,f,g)}function Tq(a,b,c,d,e,f,g,h){b.Ra=c||0;b.Z=d;b.Da=e;b.type=f||(Rq(a)?2:1);b.Ub=null!=g?g:a.F&&4==a.F.va.aa;b.sc=null!=h?h:a.F&&4==a.F.va.Nc;b.Td=!1;return b}function Uq(a){return[a.Ra,a.Z,a.Da,a.Td,a.Ub,a.sc,a.Qe,a.Sd]}function Vq(a){return{Ra:a[0],Z:a[1],Da:a[2],Td:a[3],Ub:a[4],sc:a[5],Qe:a[6],Sd:a[7]}} function Wq(a,b,c){if(null!=b.Z&&(a=Dq(a,b.Z,b.type))){var d=b.Ra&a.Ca;if(!a.cd){if(d>>>0>=a.ac)return!1}else if(d>>>0f?null!=h?(g=Zq(a,b,void 0),f=null):(f=Zq(a,b,void 0),null==f&&(g=null)):(h=Zq(a,b.substring(0,f),void 0),g=Zq(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=gq(a,g,h,f,c),d||Wq(a,e,!0)||(a.O("invalid offset: "+Qq(e)),e=null));return e}function $q(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.Ek=ar(a,b.jk=c[2]))}function Sq(a,b,c){c=c||1;null!=b.Da&&(b.Da+=c);null!=b.Z&&(b.Ra+=c,Wq(a,b)||(b.Ra=0,b.Da=null))}function Gq(a,b,c){return null!=b?r(b,4)+":"+r(a,a&-65536||c?8:4):r(a)} +k)return e;0>f?null!=h?(g=Zq(a,b,void 0),f=null):(f=Zq(a,b,void 0),null==f&&(g=null)):(h=Zq(a,b.substring(0,f),void 0),g=Zq(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=gq(a,g,h,f,c),d||Wq(a,e,!0)||(a.O("invalid offset: "+Qq(e)),e=null));return e}function $q(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.Ek=ar(a,b.kk=c[2]))}function Sq(a,b,c){c=c||1;null!=b.Da&&(b.Da+=c);null!=b.Z&&(b.Ra+=c,Wq(a,b)||(b.Ra=0,b.Da=null))}function Gq(a,b,c){return null!=b?r(b,4)+":"+r(a,a&-65536||c?8:4):r(a)} function Qq(a){var b;switch(a.type){case 1:case 3:b="&";break;case 2:b="#";break;case 4:b="%";break;case 5:b="%%";break;default:b=a.Z?"":"%"}return 4<=a.type||null==a.Z?b+r(a.Da):b+Gq(a.Ra,a.Z,a.sc)}function Hq(a,b,c){var d="";for(c=c||256;d.length>>a.F.La;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&5==d.type&&(d=Fc(a.F,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=wc[c],6==c&&(d=d.Bd,h+=" -> "+wc[d.type]),d&&a.O(r(d.id)+" %"+r(f<>>f.La].Od(e&f.Fa,a==this.ga);g&&Vb(f)}}d&&(a.push(b),c?(null!=b.Da&&(b.Z=null),b.Td=!0):(lr(this,a,a.length-1,"set"),iq(this)));return d}; -function Pq(a,b,c,d,e){for(var f=!1,g=mr(a,a.fc(c)),h=1;h>3&7,A=(3>(g>>6&3)?0:48)+p;(217==f||219==f)&&52<=A&&(A=p<<4|g&7);(p=zq[f])&&(q=p[A]);q&&(n=pq,k=q,l=k[0])}l>=n.length&&(g=a.Qa(b,1),k=Aq[l-n.length][g>>3&7],l=k[0]);n=n[l];p=k.length-1;q="";b.Ub&&(18==l? @@ -743,7 +743,7 @@ function Cr(a,b,c,d){var e={},f=a.B[b].si,g=0,h=null;0<=c&&cc?(a.O("out of data at address "+Qq(b)),n=!0):(a.tc(b,c,1),l++)})})(a,g);a.O(l+" bytes read at "+ +function Hr(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d,e=0,f=0,g=c?{}:Xq(a,b[1]);if(g&&(d=Cq(a,b[2],"drive #"),void 0!==d)){if(!c){e=Cq(a,b[3],"sector #");if(void 0===e)return;f=Cq(a,b[4],"# of sectors");void 0===f&&(f=1)}var h=a.Yb;2<=d&&a.Ib&&(d-=2,h=a.Ib);if(h){var k=h.Hi(d);if(k)if(k.ya)if(c)Dr(a),a.O(k.ya.toJSON());else if(h.mk(k,e,f)){for(var l=0,n=!1,c=Qq(g);!n&&0c?(a.O("out of data at address "+Qq(b)),n=!0):(a.tc(b,c,1),l++)})})(a,g);a.O(l+" bytes read at "+ c)}else a.O("sector "+e+" request out of range");else a.O("drive "+d+" not loaded");else a.O("invalid drive: "+d)}else a.O("disk controller not present")}}else a.O("list/load commands:"),a.O("\tl [address] [drive #] [sector #] [# sectors]")} function hr(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Vb&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(null!=b&&1g;g++){var h=c,e=null;if(g=a.Ja&&(k=null), @@ -777,7 +777,7 @@ jb,1);yg=!0;break;case 204:case 206:a.N=de;Sq(a,jb,1);break;case 205:case 224:ca jb,!0),a.Ie()||(a.F.Tc(),a.N=0)):Kr(a,Wn?"tr":"t")}break;case "r":if("reset"==b){a.da&&a.da.reset();break}hr(a,g);break;case "t":Kr(a,g[0],g[1]);break;case "u":ir(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Fr(a,b.substr(3))||(d=!1);break}a.O("PCjs version 1.21.3 ("+a.F.ja+",RELEASE,NOPREFETCH"+(vb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(ya());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var Ze;void 0!==g[3]&&(Ze=+g[3]);switch(g[2]){case "int":a.F.X.ff=Ze;break;case "start":a.F.X.Jf= Ze;break;case "stop":a.F.X.hf=Ze;break;default:a.O("unknown cs option");break a}void 0!==Ze&&Qc(a.F);a.O("checksums "+(a.F.la.We?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Zc(a.F,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.F.X.De.toFixed(2)+"Mhz")+" ("+a.F.X.Ud+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"), a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){Ir(a,b.substr(1));break}var $e="commands:",zi;for(zi in nq)$e+="\n"+ma(zi,7)+nq[zi];Uf(a)||($e+="\nnote: frequency/history disabled if no exec breakpoints");a.O($e);break;default:a.O("unknown command: "+b),d=!1}}}catch(Zn){a.O("debugger error: "+(Zn.stack||Zn.message)),d=!1}return d}function kq(a,b,c){b=ar(a,b,c);for(var d in b)if(!or(a,b[d]))return!1;return!0} -Qa(function(){for(var a=nb(document,"pcjs","debugger"),b=0;bTr){if(d.load(this.U)){this.N=new jf(this,Vr,"failsafe");this.N.load()&&(Zr(this,d),a=2,Nr(this.N));N(this.N,"timestamp",qa());Or(this.N);var e=this.A&&!this.L;if(1==a||za("Click OK to restore the previous PCjs machine state, or CANCEL to reset the machine.")){if(c=Pr(d)){var f=Qr(d,"code"),g=Qr(d,"data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!= g?(this.Oa("Error: "+g),"unable to verify user"==g&&(Fa("user",""),this.B=null)):this.O(f+": "+g),Nr(d),d.load()?(c=Pr(d),e=!0):c=!1))}e&&Yr(this,c?d:null)}else 2==a&&d.clear()}else Yr(this);delete this.U;delete this.W}e=gb(this.id);for(f=0;fa[1];a=a[2];this.la.ec=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.ga||(this.O("PCjs v"+Vr+"\nCopyright \u00a9 2012-2016 Jeff Parsons \nLicense: GPL version 3 or later "),this.ga=!0);this.F&&($r(this,this.F,b,c,a),Uc(this.F));this.ia&&(Zr(this,b),b.clear());!c&&this.N&&(this.N.clear(),delete this.N);this.C=0}; function Zr(a,b){if(za("There may be a problem with your PCjs machine.\n\nTo help us diagnose it, click OK to send this PCjs machine state to http://www.pcjs.org.")){var c=a.ra,d=a.he(),e=b.toString(),f={app:"PCjs"};f.ver=Vr;f.url=c;f.user=d;f.type="bug";f.data=e;wa("http://www.pcjs.org/api/v1/report",f,!0)}} function Lr(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new jf(a,Vr),g=new jf(a,Vr,"validate"),h=qa();N(g,"timestamp",h);N(f,"timestamp",h);N(f,"version","1.21.3");N(f,"url",window?window.location.href:null);N(f,"browser",ya());a.F&&a.F.jc&&(c&&a.F.Xb(),d=a.F.jc(b,c),"object"===typeof d&&N(f,a.F.id,d),c&&(a.F.la.ec=!1,!1===d&&(e=null)));for(var h=gb(a.id),k=0;k]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=q.exec(h[l]);){var p=d[2];p&&(h[p]||(n=n.replace(d[0],"")))}d=l=fa(l)}else"xsl"==q&&(e=l=fa(l));k[l]=n}a&&(k[l="css"]=a);b[2]&&(k[l="parms"]=b[2]);b[3]&&(k[l="state"]=b[3]);d&&e?(l=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+l+";"+c[2]+c[3],c=c.replace(/\u00A9/g, "©"),c=Ia(c,"javascript",!1,g),c=c+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('
\n'),c+="...\n",c+='