Fixed PCx86 "Save Machine" functionality (broken by the inclusion of source maps at the end of the compiled scripts)
This commit is contained in:
parent
af252fc606
commit
159588623a
341 changed files with 193383 additions and 320 deletions
|
|
@ -672,24 +672,24 @@ var Pt="Hard Drive",Ut=["XTC","ATC","COMPAQ"],Qt=[{0:[306,2],1:[375,8],2:[306,6]
|
|||
112,ru=144,yu=145,su=240,zu=2,mu=4,Fu=0,Gu=2,Ju=0,Ku=1,Bu=3,Lu=5,Mu=8,Ou=10,Zt=12,Qu=15,Hu=224,Iu=228,Ot=0,Du=4,Su=20,Nt=0,$t=1,Wt=2,Xt=4,Yt=8,Vt=32,Ft={800:Z.prototype.wl,801:Z.prototype.xl,802:Z.prototype.vl},Et={496:Z.prototype.Yj,497:Z.prototype.Dk,498:Z.prototype.Fk,499:Z.prototype.Gk,500:Z.prototype.Bk,501:Z.prototype.Ak,502:Z.prototype.Ck,503:Z.prototype.Hk},Ht={800:Z.prototype.Om,801:Z.prototype.Rm,802:Z.prototype.Qm,803:Z.prototype.Pm,807:Z.prototype.gh,811:Z.prototype.gh,815:Z.prototype.gh},
|
||||
Gt={496:Z.prototype.Zl,497:Z.prototype.dm,498:Z.prototype.bm,499:Z.prototype.cm,500:Z.prototype.Yl,501:Z.prototype.Xl,502:Z.prototype.$l,503:Z.prototype.Wl,1014:Z.prototype.am};Ma(function(){for(var a=cb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=db(c),d=new Z(d);bb(d,c)}});
|
||||
function Uu(a,b,c){u.call(this,"Computer",a);var d=this;Vu(this,b);this.U=Fc(this,"autoPower",a);this.D=+Fc(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.ma=a.busWidth||a.buswidth;this.A=Wu;this.M=null;this.J=this.fa=!1;this.pa=Fc(this,"url")||"";this.ra=(Math.random()+.1).toString(36).substr(2,12);this.B=Xu(this);if(this.R=ab("CPU",this.id)){this.Ea=ab("Debugger",this.id);this.C=[];for(b=null;b=tb(this,"Video",b);)this.C.push(b);this.oa=new Gb({id:this.Cd+".bus",busWidth:this.ma},
|
||||
this.R,this.Ea);var e,f=eb(this.id);this.ba=(this.I=ab("Panel",this.id))&&this.I.ia.print;this.ja=this.wa;this.la=this.print;this.qa=this.qb;this.ba&&(this.ja=this.I.wa,this.la=this.I.print,this.qa=this.I.qb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){Yu(d,a);return d.ja.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.qb=function(a,b,c){Yu(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.H=0;!this.ba&&this.D&&Zu(this);this.qb("PCx86 v1.36.1\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.kc&&e.kc(this,this.oa,this.R,this.Ea);Gc(this.R,this.id,function(){bd(d)},1E3/$u);b=null;e=Fc(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Ia("state");f||(e=!0,f=Fc(this,"state",a));f&&(b=this.Y=f,e||(this.J=!0,this.A=Wu),this.A&&(this.N=new Me(this,"1.36.1"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=av(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";wa(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,
|
||||
this.R,this.Ea);var e,f=eb(this.id);this.ba=(this.I=ab("Panel",this.id))&&this.I.ia.print;this.ja=this.wa;this.la=this.print;this.qa=this.qb;this.ba&&(this.ja=this.I.wa,this.la=this.I.print,this.qa=this.I.qb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){Yu(d,a);return d.ja.call(this,a,b,c)}.bind(e),e.print=function(a){return d.la.call(this,a)}.bind(e),e.qb=function(a,b,c){Yu(d,a,b);return d.qa.call(this,a,b,c)}.bind(e);this.H=0;!this.ba&&this.D&&Zu(this);this.qb("PCx86 v1.36.2\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
|
||||
for(b=0;b<f.length;b++)e=f[b],e.kc&&e.kc(this,this.oa,this.R,this.Ea);Gc(this.R,this.id,function(){bd(d)},1E3/$u);b=null;e=Fc(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Ia("state");f||(e=!0,f=Fc(this,"state",a));f&&(b=this.Y=f,e||(this.J=!0,this.A=Wu),this.A&&(this.N=new Me(this,"1.36.2"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=av(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";wa(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,
|
||||
d.wa("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(d.M=b,d.fa=!0);v(d)},function(){d.qb(g,mb.ae)})}else v(this);this.ia.power||(this.U=!0);!c&&this.U&&this.ye(this.ue)}else q("Unable to find CPU component")}ca(Uu,u);function Zu(a){if(!a.H)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.Ef)&&(c.style.opacity="1",c.style.lineHeight="1",a.H++)}}
|
||||
function Yu(a,b,c){if(a.H)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.Ef)&&(c!=mb.ae||"..."!=b.slice(-3)?Ya(e,b+"\n"):Za(e,b,b+"."))}}function ho(a){var b=a.D;3==a.D&&(a.D++,v(a));return!b}function Vu(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.K=b}function Fc(a,b,c){var d=Ia(b);void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=Uu.prototype;
|
||||
l.ye=function(a,b){for(var c=this,d=eb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.ye(a,b)});return}}a.call(this,b)};function bv(a,b){var c=new Me(a,"1.36.1",cv);if(c.load()&&dv(c)){var d=c.get(ev),e=b?b.get(ev):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.ue=function(a){void 0===a&&(a=this.A||(this.M?fv:Wu));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.N||new Me(this,"1.36.1");if(a==Oc)b=!0;else if(a>Wu){if(d.load(this.M)){this.G=new Me(this,"1.36.1",gv);this.G.load()&&(a!=fv&&hv(this,d)&&(a=iv),jv(this.G));this.G.set(ev,ra("Y-m-d H:i:s"));kv(this.G);var e=this.A&&!this.J;if(a==fv||Xa("Click OK to restore the previous PCx86 machine state.")){if(c=dv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
l.ye=function(a,b){for(var c=this,d=eb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!ob(f)){ob(f,function(){c.ye(a,b)});return}}a.call(this,b)};function bv(a,b){var c=new Me(a,"1.36.2",cv);if(c.load()&&dv(c)){var d=c.get(ev),e=b?b.get(ev):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
|
||||
l.ue=function(a){void 0===a&&(a=this.A||(this.M?fv:Wu));if(!this.F){this.F++;var b=!1,c=!1;this.da=!1;var d=this.N||new Me(this,"1.36.2");if(a==Oc)b=!0;else if(a>Wu){if(d.load(this.M)){this.G=new Me(this,"1.36.2",gv);this.G.load()&&(a!=fv&&hv(this,d)&&(a=iv),jv(this.G));this.G.set(ev,ra("Y-m-d H:i:s"));kv(this.G);var e=this.A&&!this.J;if(a==fv||Xa("Click OK to restore the previous PCx86 machine state.")){if(c=dv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.wa("Error: "+g),"unable to verify user"==g&&(Da(lv,""),this.B=null)):this.qb(f+": "+g),jv(d),d.load()?(c=dv(d),e=!0):c=!1))}e&&bv(this,c?d:null)}else a==iv&&d.clear()}else bv(this);delete this.M;delete this.N}e=eb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.R&&(c=mv(this,g,d,b,c));b=[d,a,c];a!=Oc?this.ye(this.ig,b):this.ig(b)}};
|
||||
function mv(a,b,c,d,e){if(!b.X.Sb){b.X.Sb=!0;if(b.Rb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Rb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.Y&&!a.fa?(c.clear(),a.A=Wu,window&&window.location.reload()):a.da=!0),b.Rb(null),e=!1)}b.X.Je=!0;if(!d&&b.ki)for(a=b.ki.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.ig=function(a){if(!this.X.Je){var b;a:{if(this.H){if(2==this.D){this.D++;this.qb("Press any key to continue...");b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.Ef)){var d=za();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.H=0}this.D=0;b=!0}if(!b){v(this,!1);this.ye(this.ig,a);return}this.X.Je=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ia.power)d.textContent="Shutdown";this.X.Sb=!0;this.R&&(mv(this,
|
||||
this.R,b,c,a),this.R.Gd());this.da&&(hv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.F=0;gb(this.Cd,Fc(this,"autoScript"))};function hv(a,b){if(!a.X.Yd){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.1"};d.url=a.pa;d.user=c;d.type="bug";d.data=b;wa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function nv(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Me(a,"1.36.1"),g=new Me(a,"1.36.1",cv),h=ra("Y-m-d H:i:s");g.set(ev,h);f.set(ev,h);f.set(ov,"1.36.1");f.set(pv,window?window.location.href:null);f.set(qv,za());a.R&&a.R.Qb&&(d=a.R.Qb(b,c),"object"===typeof d&&f.set(a.R.id,d),c&&(a.R.X.Sb=!1,!1===d&&(e=null)));for(var h=eb(a.id),k=0;k<h.length;k++){var m=h[k];m.X.Sb&&(m.Qb&&(d=m.Qb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.X.Sb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&rv(a,
|
||||
this.R,b,c,a),this.R.Gd());this.da&&(hv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.F=0;gb(this.Cd,Fc(this,"autoScript"))};function hv(a,b){if(!a.X.Yd){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.2"};d.url=a.pa;d.user=c;d.type="bug";d.data=b;wa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
|
||||
function nv(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new Me(a,"1.36.2"),g=new Me(a,"1.36.2",cv),h=ra("Y-m-d H:i:s");g.set(ev,h);f.set(ev,h);f.set(ov,"1.36.2");f.set(pv,window?window.location.href:null);f.set(qv,za());a.R&&a.R.Qb&&(d=a.R.Qb(b,c),"object"===typeof d&&f.set(a.R.id,d),c&&(a.R.X.Sb=!1,!1===d&&(e=null)));for(var h=eb(a.id),k=0;k<h.length;k++){var m=h[k];m.X.Sb&&(m.Qb&&(d=m.Qb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.X.Sb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&rv(a,
|
||||
a.B,f.toString()),kv(g)&&kv(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==sv),d&&f.clear(h)):e=f.toString());c&&(a.X.Sb=!1,b=a.ia.power)&&(b.textContent="Power");a.F=0;return e}l.reset=function(){this.oa&&this.oa.reset&&this.oa.reset();for(var a=eb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.oa&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
l.stop=function(a,b){for(var c=eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.Ab=function(a,b,c){var d=this;switch(b){case "power":return this.ia[b]=c,c.onclick=function(){d.F||(d.X.Sb?nv(d,!1,!0):d.ye(d.ue))},!0;case "reset":return this.ia[b]=c,c.onclick=function(){if(d.X.Sb&&!d.F)if(d.R&&(d.R.X.Gd=d.R.X.cb),d.A&&!d.L){var a=d.X.Yd||!Xa("Click OK to reset this PCx86 machine and discard all disk modifications.");nv(d,a,!0);!a&&d.Y?window&&window.location.reload():(a||(d.W=!0),d.ue(Wu),d.W=!1)}else d.reset(),d.R&&d.R.Gd()},!0;case "save":if(ma(xa(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ia[b]=c,c.onclick=function(){var a=Xu(d,!0);if(a){var b=!!(d.A&&!d.L||d.Y),c=nv(d,b);b?rv(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Xu(a,b){var c=a.B;c||((c=Ca(lv),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=tv(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
|
||||
function tv(a,b){a.B=null;b=wa(xa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Da(lv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function av(a){var b=null;a.B&&(b=xa()+"/api/v1/user?req=load&user="+a.B+"&state="+uv(a,"1.36.1"));return b}
|
||||
function rv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=uv(a,"1.36.1");d.data=c;b=wa(xa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),Da(lv,""),a.B=null)}}
|
||||
function tv(a,b){a.B=null;b=wa(xa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Da(lv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function av(a){var b=null;a.B&&(b=xa()+"/api/v1/user?req=load&user="+a.B+"&state="+uv(a,"1.36.2"));return b}
|
||||
function rv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=uv(a,"1.36.2");d.data=c;b=wa(xa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),Da(lv,""),a.B=null)}}
|
||||
function tb(a,b,c){a=eb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function Tc(a,b){if(a.C.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.C[0];a.F&&a.F.focus();!b&&window&&window.scrollTo(c,d)}}
|
||||
function bd(a,b){if(a.R){var c=a.R;if(c.ji&&(b||!c.X.cb||c.X.ei)){uf(c,"EAX",c.F);uf(c,"EBX",c.G);uf(c,"ECX",c.H);uf(c,"EDX",c.L);uf(c,"ESP",C(c));uf(c,"EBP",c.M);uf(c,"ESI",c.J);uf(c,"EDI",c.I);uf(c,"CS",c.fa.ha);uf(c,"DS",c.Ga.ha);uf(c,"SS",c.W.ha);uf(c,"ES",c.xa.ha);uf(c,"EIP",F(c));var d=wd(c);uf(c,"PS",d);uf(c,"V",d&2048);uf(c,"D",d&1024);uf(c,"I",d&512);uf(c,"T",d&256);uf(c,"S",d&128);uf(c,"Z",d&64);uf(c,"A",d&16);uf(c,"P",d&4);uf(c,"C",d&1);80386==c.ca&&(uf(c,"FS",c.rb.ha),uf(c,"GS",c.vb.ha),
|
||||
uf(c,"CR0",c.pa),uf(c,"CR2",c.rd),uf(c,"CR3",c.Vc))}if(d=c.ia.speed)d.textContent=c.X.cb&&c.V.hd?c.V.hd.toFixed(2)+"Mhz":"Stopped"}for(c=0;c<a.C.length;c++)lq(a.C[c],b)}var gv="failsafe",cv="validate",ev="timestamp",ov="version",pv="url",qv="browser",lv="user",Oc=-1,Wu=0,fv=1,iv=2,sv=3,$u=2;Ma(function(){for(var a=cb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=db(c),c=cb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=db(f),g=new Uu(g,d,!0);bb(g,f);g.U&&g.ye(g.ue)}});
|
||||
|
|
@ -704,10 +704,10 @@ b:""),null)}
|
|||
function yv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");wa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
|
||||
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);yv(a,b,c)}})}else c(a,null)}
|
||||
function zv(a,b,c,d){function e(a){if(void 0===h){var b=g&&cb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=na(a))}function f(a){e("Error: "+a);k&&(--vv||Qa(!0));k=!1}var g,h,k=!0;vv++;Wa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));r.appendChild(y)}c||
|
||||
(c="/versions/pcx86/1.36.1/components.xsl");m=function(d,h){h?wv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--vv||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--vv||Qa(!0)):f("invalid machine element: "+
|
||||
(c="/versions/pcx86/1.36.2/components.xsl");m=function(d,h){h?wv(c,null,null,!1,e,function(d,k){k?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--vv||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--vv||Qa(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?wv(b,a,d,!0,e,m):xv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function Av(a,b,c,d){Qa(!1);return zv(a,b,c,d)}window.embedPC=Av;window.embedPCx86=Av;
|
||||
window.commandMachine=function(a,b,c,d,e,f){if("script"==e)return gb(c,f)?(b&&(a.disabled=!0),!0):!1;if(d){var g=ab(d,c+".machine");if(g){var h=g.exports;if(h&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1}}console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=Qa;window.sendEvent=Sa;
|
||||
function Bv(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?wa(b,null,!0,function(a,b){Cv(b,d)}):Cv(null,d)}else q("Error ("+c+") requesting "+a)}
|
||||
function Cv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=Wa[f],k={},m;for(m in h){var r=h[m],y=la(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=ka(m)}else"xsl"==y&&(e=m=ka(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",q(a)):q("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=nv(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.1/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Dj:g}))return!0;wa(b,null,!0,function(c,d,e){Bv(c,d,e,[a,ka(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.1/pcx86.map
|
||||
function Cv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];if(c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=Wa[f],k={},m;for(m in h){var r=h[m],y=la(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=ka(m)}else"xsl"==y&&(e=m=ka(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",q(a)):q("Missing XML/XSL resources")}else q("Unsupported script")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=nv(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.2/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Dj:g}))return!0;wa(b,null,!0,function(c,d,e){Bv(c,d,e,[a,ka(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.2/pcx86.map
|
||||
|
|
|
|||
Loading…
Reference in a new issue